package com.stylefeng.guns.modular.pay.payment.allin.common.api;

import java.io.Serializable;

import javax.validation.constraints.Pattern;

import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;

/**
 * 单笔实时代付
 * @author DevinYang
 * @date 2018年6月13日  
 *
 */
public class RpcSingleTranxReq implements Serializable{
	private static final long serialVersionUID = 1L;
	
	private String req_sn;			//请求订单号
	private String submitTime;		//提交时间
	private String validate;		//有效期YYYYMMDD，用于信用卡
	private String cvv2;			//信用卡CVV2
	private String bankCode;		//银行代码,银行代码，存折必须填写
	private String accountType;		//账号类型
	private String accountNo;		//账号
	private String accountName;		//账号名
	private String province;		//开户行所在省
	private String city;			//开户行所在市
	private String accountProp;		//账号属性
	private String amount;			//整数，单位分
	private String currency;		//货币类型
	private String idType;			//开户证件类型
	private String id;				//证件号
	private String settacct;		//本交易结算户
	private String tel;				//手机号/小灵通
	private String custUserid;		//自定义用户号
	private String settgroupflag;	//证件号
	private String summary;			//交易附言
	private String remark;			//备注
	
	
	
	@NotEmpty(message="req_sn参数为空")
	@Length(max=40,message="req_sn超出最大40位长度")
	public String getReq_sn() {
		return req_sn;
	}
	public void setReq_sn(String req_sn) {
		this.req_sn = req_sn;
	}
	@NotEmpty(message="submitTime参数为空")
	@Length(min=14,max=14,message="submitTime格式错误")
	public String getSubmitTime() {
		return submitTime;
	}
	public void setSubmitTime(String submitTime) {
		this.submitTime = submitTime;
	}
	
	@Length(max=8,message="validate格式错误")
	@Pattern(regexp="[0-9]{8}",message="validate格式错误")
	public String getValidate() {
		return validate;
	}
	public void setValidate(String validate) {
		this.validate = validate;
	}
	@Length(min=3,max=3,message="cvv2格式错误")
	public String getCvv2() {
		return cvv2;
	}
	public void setCvv2(String cvv2) {
		this.cvv2 = cvv2;
	}
	@Length(min=3,max=10,message="bankCode长度错误")
	public String getBankCode() {
		return bankCode;
	}
	public void setBankCode(String bankCode) {
		this.bankCode = bankCode;
	}
	
	@Pattern(regexp="00|01",message="accountType参数只能为00或01")
	public String getAccountType() {
		return accountType;
	}
	public void setAccountType(String accountType) {
		this.accountType = accountType;
	}
	
	@NotEmpty(message="accountNo参数为空")
	@Length(min=1,max=32,message="accountNo参数长度错误")
	public String getAccountNo() {
		return accountNo;
	}
	public void setAccountNo(String accountNo) {
		this.accountNo = accountNo;
	}
	
	@NotEmpty(message="accountName参数为空")
	@Length(min=1,max=60,message="accountName参数长度错误")
	public String getAccountName() {
		return accountName;
	}
	public void setAccountName(String accountName) {
		this.accountName = accountName;
	}
	@Length(min=1,max=20,message="province参数长度错误")
	public String getProvince() {
		return province;
	}
	public void setProvince(String province) {
		this.province = province;
	}
	@Length(min=1,max=20,message="city参数长度错误")
	public String getCity() {
		return city;
	}
	public void setCity(String city) {
		this.city = city;
	}
	
	@NotEmpty(message="accountProp参数为空")
	@Pattern(regexp="0|1",message="accountProp参数错误只能为0或1")
	public String getAccountProp() {
		return accountProp;
	}
	public void setAccountProp(String accountProp) {
		this.accountProp = accountProp;
	}
	
	@NotEmpty(message="amount参数为空")
	@Length(min=1,max=12,message="金额值已超出长度范围")
	@Pattern(regexp="^\\d+$",message="金额只能为数字")
	public String getAmount() {
		return amount;
	}
	public void setAmount(String amount) {
		this.amount = amount;
	}
	
	@Length(min=3,max=3,message="currency长度错误")
	public String getCurrency() {
		return currency;
	}
	public void setCurrency(String currency) {
		this.currency = currency;
	}
	
	@Length(min=1,max=1,message="idType长度错误")
	@Pattern(regexp="0|1|2|3|4|5|6|7|8|9|X",message="idType参数错误")
	public String getIdType() {
		return idType;
	}
	public void setIdType(String idType) {
		this.idType = idType;
	}
	
	@Length(min=1,max=22,message="id长度错误")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	@Length(min=1,max=32,message="settacct长度错误")
	public String getSettacct() {
		return settacct;
	}
	public void setSettacct(String settacct) {
		this.settacct = settacct;
	}
	@Length(min=1,max=13,message="tel长度错误")
	public String getTel() {
		return tel;
	}
	public void setTel(String tel) {
		this.tel = tel;
	}
	@Length(min=1,max=128,message="custUserid长度错误")
	public String getCustUserid() {
		return custUserid;
	}
	public void setCustUserid(String custUserid) {
		this.custUserid = custUserid;
	}
	@Length(min=1,max=30,message="settgroupflag长度错误")
	public String getSettgroupflag() {
		return settgroupflag;
	}
	public void setSettgroupflag(String settgroupflag) {
		this.settgroupflag = settgroupflag;
	}
	
	@Length(min=1,max=50,message="summary长度错误")
	public String getSummary() {
		return summary;
	}
	public void setSummary(String summary) {
		this.summary = summary;
	}
	public String getRemark() {
		return remark;
	}
	public void setRemark(String remark) {
		this.remark = remark;
	}

}
